/*
Designed By Theekshana Wickramathilake
SCL B6
SDA B7
------  I2C1   --------
 */
#ifndef __I2CDRIVER_H
#define __I2CDRIVER_H

#ifdef __cplusplus
 extern ""C"" {
#endif

/* Includes -----------------------------------------------------------------------*/
#include "stm32f4xx_gpio.h"
#include "stm32f4xx_i2c.h"
#include "stm32f4xx_rcc.h"
/* Exported constants -------------------------------------------------------------*/

#define I2CDRIVERSCL 		GPIO_Pin_6
#define I2CDRIVERSCLLine 	GPIO_PinSource6
#define I2CDRIVERSDA 		GPIO_Pin_7
#define I2CDRIVERSDALine 	GPIO_PinSource7
#define I2CDRIVERPORT 	    GPIOB
#define I2CDRIVERI2C 		I2C1

/* Exported functions -------------------------------------------------------------*/
void InitI2CDRIVER();
void I2CDRIVERGPIOConfig();
void I2CDRIVERI2CConfig();
int I2CDRIVER_Read(int devAdress ,int Address);
void I2CDRIVER_Write(int devAdress ,int Address, int Value);
#endif
